__author__ = 'cloud'
from django_tables2 import tables
from clients.models import Operation, Bonus, Agreement, Service

class GtLinkTable(tables.Table):
    class Meta:
        attrs = {'class': 'paleblue', }

class OperationsTable(GtLinkTable):
    class Meta(GtLinkTable.Meta):
        model = Operation
        fields = ('name','amount','agreement','date')

class BonusesTable(GtLinkTable):
    class Meta(GtLinkTable.Meta):
        model = Bonus
        exclude = ('id','author')

class AgreementsTable(GtLinkTable):
    class Meta(GtLinkTable.Meta):
        model = Agreement
        exclude = ('id','client')

class ServicesTable(GtLinkTable):
    class Meta(GtLinkTable.Meta):
        model = Service
        exclude = ('id','client', 'connection_type','code_connect','code_disconnect','code_activate','code_block')


